package com.prs.ftpserver.main;

import com.prs.defaultTools.Ftp;
import com.prs.defaultTools.PrsToolKit;

/**
 * <p>
 * Copyright: Copyright (c) 2012
 * </p>
 * 
 * @author JohnLan E-mail:JohnMr.Lan@foxmail.com
 * @version ����ʱ�䣺2012-7-11 ����09:36:51
 * 
 *          ��˵�� ftp��������
 */

public class FtpMain {
	
	/**
	 * 上传
	 * 
	 * @param path
	 * @param fileName
	 */
	public boolean uploadFile(String path, String fileName) {
		Ftp FTP = new Ftp();
		return FTP.uploadDocToDeparment(path, fileName);

	}

	
	/**
	 * 下载
	 * 
	 * @param path
	 * @param fileName
	 */
	public String  downFile(String path) {
	
		  Ftp FTP = new Ftp();
		 return FTP.downloadFile("OA_DOCUMENT",path,"PDM��ERP�ν�ҵ������˵��20111225л.doc",false,"PDM��ERP�ν�ҵ������˵��20111225л.doc");

	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {

//		System.out.println("�ϴ�״̬:"+ new FtpMain().uploadFile("D:\\PDM��ERP�ν�ҵ������˵��20111225л.doc","PDM��ERP�ν�ҵ������˵��20111225л.doc"));
		
		System.out.println("���أ�"+new FtpMain().downFile("C:\\"));
		
	
	}

}
